import Vue from 'vue';
import Router from 'vue-router';
import MainIndex from '@/views/MainIndex.vue';
import HelloWorld from '@/views/HelloWorld.vue';
 
Vue.use(Router);
 
const router = new Router({
  mode: 'history', // 使用HTML5 History模式
  routes: [
    {
      path: '/mainindex',
      name: 'MainIndex',
      component: MainIndex
    },
    {
      path: '/helloworld',
      name: 'HelloWorld',
      component: HelloWorld
    }
  ]
});
 
export default router;